﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Index/Index_Two.master" AutoEventWireup="true" CodeFile="MedicalRecordEdit.aspx.cs" Inherits="Index_MedicalRecord_MedicalRecordEdit" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Title" runat="Server">
    康复评估
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Info" runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="Map" runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="Tool" runat="Server">
    <asp:Button ID="btn_GotoList" runat="server" PostBackUrl="MedicalRecordList.aspx" Text="返回列表" CssClass="ui-btn" />
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="Main_Left_Title" runat="Server">
    新建病历
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="Main_Left" runat="Server">
    <div class="ui-panel-detail">
        <div class="ui-title">
            <h1>基本信息填写</h1>
        </div>
        <ul class="ui-goto-list">
            <li><a href="#BaseInfo">基本信息</a></li>
            <li><a href="#Hospitalized">入院信息</a></li>
            <li><a href="#Diagnosis">诊&nbsp;&nbsp;&nbsp;&nbsp;断</a></li>
            <li><a href="#Assessment">基础评估</a></li>
        </ul>
        <asp:Repeater ID="rpt_GaugeRecord" runat="server">
            <ItemTemplate>
                <div class="ui-title">
                    <a href='../Gauge/GaugeRecordView.aspx?MedicalRecordId=<%=Id %>&GaugeRecordId=<%#Eval("GaugeRecordId") %>'>
                        第<%#Container.ItemIndex + 1 %>次评估&nbsp;&nbsp;
                        <%#Convert.ToDateTime(Eval("CreateDate")).ToString("yyyy年MM月dd日") %>
                    </a>
                </div>
            </ItemTemplate>
        </asp:Repeater>
    </div>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="Main_Right_Title" runat="Server">
    填写信息
</asp:Content>
<asp:Content ID="Content9" ContentPlaceHolderID="Main_Right" runat="Server">

    <div class="ui-panel-detail">
        <div class="ui-title">
            <h1 id="BaseInfo">基本信息填写
                <asp:LinkButton ID="lbtn_BaseInfo_Edit" runat="server" Text="修改" CssClass="ui-title-lbtn" Visible="true" CommandName="BaseInfo" OnClick="btn_Modify_Click"></asp:LinkButton>
                <asp:LinkButton ID="lbtn_BaseInfo_Save" runat="server" Text="保存" CssClass="ui-title-lbtn" Visible="false" OnClick="btn_Submit_Click"></asp:LinkButton>
                <asp:LinkButton ID="lbtn_BaseInfo_Cancel" runat="server" Text="取消" CssClass="ui-title-lbtn" Visible="false" OnClick="btn_Cancel_Click"></asp:LinkButton>
            </h1>
        </div>
        <asp:Panel ID="pnl_BaseInfo_Edit" runat="server">
            <table class="ui-panel-detail-table">
                <tr>
                    <th>姓&nbsp;&nbsp;&nbsp;&nbsp;名：</th>
                    <td>
                        <asp:TextBox ID="txt_Name" runat="server" CssClass="ui-text"></asp:TextBox>
                    </td>
                    <th>性&nbsp;&nbsp;&nbsp;&nbsp;别：</th>
                    <td>
                        <asp:RadioButtonList ID="rbl_Gender" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow">
                            <asp:ListItem Text="男" Value="1"></asp:ListItem>
                            <asp:ListItem Text="女" Value="1"></asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                    <th>出生年月：</th>
                    <td>
                        <asp:TextBox ID="txt_BirthDay" runat="server" CssClass="ui-text"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <th>电&nbsp;&nbsp;&nbsp;&nbsp;话：</th>
                    <td>
                        <asp:TextBox ID="txt_Phone" runat="server" CssClass="ui-text"></asp:TextBox>
                    </td>
                    <th>籍&nbsp;&nbsp;&nbsp;&nbsp;贯：</th>
                    <td>
                        <asp:TextBox ID="txt_PlaceOfOrigin" runat="server" CssClass="ui-text"></asp:TextBox>
                    </td>
                    <th>左右利手：</th>
                    <td>
                        <asp:RadioButtonList ID="rbl_Handedness" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow">
                            <asp:ListItem Text="左" Value="1"></asp:ListItem>
                            <asp:ListItem Text="右" Value="2"></asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                </tr>
            </table>
            <table class="ui-panel-detail-table">
                <tr>
                    <th>证&nbsp;件&nbsp;号：</th>
                    <td>
                        <asp:TextBox ID="txt_CertificateNo" runat="server" CssClass="ui-text" Width="240px"></asp:TextBox>
                    </td>
                    <th style="text-align: right">家庭住址：</th>
                    <td>
                        <asp:TextBox ID="txt_HomeAddress" runat="server" CssClass="ui-text" Width="280px"></asp:TextBox>
                    </td>
                </tr>
            </table>
        </asp:Panel>
        <asp:Panel ID="pnl_BaseInfo_View" runat="server">
            <table class="ui-panel-detail-table">
                <tr>
                    <th>姓&nbsp;&nbsp;&nbsp;&nbsp;名：</th>
                    <td style="width: 150px;">
                        <asp:Literal ID="lbl_Name" runat="server"></asp:Literal>
                    </td>
                    <th>性&nbsp;&nbsp;&nbsp;&nbsp;别：</th>
                    <td style="width: 150px;">
                        <asp:Literal ID="lbl_Gender" runat="server"></asp:Literal>
                    </td>
                    <th>出生年月：</th>
                    <td style="width: 150px;">
                        <asp:Literal ID="lbl_BirthDay" runat="server"></asp:Literal>
                    </td>
                </tr>
                <tr>
                    <th>电&nbsp;&nbsp;&nbsp;&nbsp;话：</th>
                    <td>
                        <asp:Literal ID="lbl_Phone" runat="server"></asp:Literal>
                    </td>
                    <th>籍&nbsp;&nbsp;&nbsp;&nbsp;贯：</th>
                    <td>
                        <asp:Literal ID="lbl_PlaceOfOrigin" runat="server"></asp:Literal>
                    </td>
                    <th>左右利手：</th>
                    <td>
                        <asp:Literal ID="lbl_Handedness" runat="server"></asp:Literal>
                    </td>
                </tr>
            </table>
            <table class="ui-panel-detail-table">
                <tr>
                    <th>证&nbsp;件&nbsp;号：</th>
                    <td style="width: 250px;">
                        <asp:Literal ID="lbl_CertificateNo" runat="server"></asp:Literal>
                    </td>
                    <th style="text-align: right">家庭住址：</th>
                    <td>
                        <asp:Literal ID="lbl_HomeAddress" runat="server"></asp:Literal>
                    </td>
                </tr>
            </table>
        </asp:Panel>
    </div>
    <div class="ui-panel-detail">
        <div class="ui-title">
            <h1 id="Hospitalized">入院信息填写
                <asp:LinkButton ID="lbtn_Hospitalized_Edit" runat="server" Text="修改" CssClass="ui-title-lbtn" Visible="true" CommandName="Hospitalized" CommandArgument="Edit" OnClick="btn_Modify_Click"></asp:LinkButton>
                <asp:LinkButton ID="lbtn_Hospitalized_Save" runat="server" Text="保存" CssClass="ui-title-lbtn" Visible="false" OnClick="btn_Submit_Click"></asp:LinkButton>
                <asp:LinkButton ID="lbtn_Hospitalized_Cancel" runat="server" Text="取消" CssClass="ui-title-lbtn" Visible="false" OnClick="btn_Cancel_Click"></asp:LinkButton>
            </h1>
        </div>
        <asp:Panel ID="pnl_Hospitalized_Edit" runat="server">
            <table class="ui-panel-detail-table">
                <tr>
                    <th>病&nbsp;床&nbsp;号：</th>
                    <td>
                        <asp:TextBox ID="txt_BedNumber" runat="server" CssClass="ui-text"></asp:TextBox>
                    </td>
                    <th>病&nbsp;案&nbsp;号：</th>
                    <td>
                        <asp:TextBox ID="txt_RecordNumber" runat="server" CssClass="ui-text"></asp:TextBox>
                    </td>
                    <th>科&nbsp;&nbsp;&nbsp;&nbsp;室：</th>
                    <td>
                        <asp:DropDownList ID="ddl_Department" runat="server" CssClass="ui-select">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <th>主治医生：</th>
                    <td>
                        <asp:TextBox ID="txt_Doctor" runat="server" CssClass="ui-text"></asp:TextBox>
                    </td>
                    <th>主管治疗师：</th>
                    <td>
                        <asp:TextBox ID="txt_Therapist" runat="server" CssClass="ui-text"></asp:TextBox>
                    </td>
                    <th></th>
                    <td></td>
                </tr>
                <tr>
                    <th>备&nbsp;&nbsp;&nbsp;&nbsp;注：</th>
                    <td colspan="5">
                        <asp:TextBox ID="txt_Remark" runat="server" CssClass="ui-text" Width="620px"></asp:TextBox>
                    </td>
                </tr>
            </table>
        </asp:Panel>
        <asp:Panel ID="pnl_Hospitalized_View" runat="server">
            <table class="ui-panel-detail-table">
                <tr>
                    <th>病&nbsp;床&nbsp;号：</th>
                    <td style="width: 150px;">
                        <asp:Literal ID="lbl_BedNumber" runat="server"></asp:Literal>
                    </td>
                    <th>病&nbsp;案&nbsp;号：</th>
                    <td style="width: 150px;">
                        <asp:Literal ID="lbl_RecordNumber" runat="server"></asp:Literal>
                    </td>
                    <th>科&nbsp;&nbsp;&nbsp;&nbsp;室：</th>
                    <td style="width: 150px;">
                        <asp:Literal ID="lbl_Department" runat="server"></asp:Literal>
                    </td>
                </tr>
                <tr>
                    <th>主治医生：</th>
                    <td style="width: 150px;">
                        <asp:Literal ID="lbl_Doctor" runat="server"></asp:Literal>
                    </td>
                    <th>主管治疗师：</th>
                    <td style="width: 150px;">
                        <asp:Literal ID="lbl_Therapist" runat="server"></asp:Literal>
                    </td>
                    <th></th>
                    <td></td>
                </tr>
                <tr>
                    <th>备&nbsp;&nbsp;&nbsp;&nbsp;注：</th>
                    <td colspan="5">
                        <asp:Literal ID="lbl_Remark" runat="server"></asp:Literal>
                    </td>
                </tr>
            </table>
        </asp:Panel>
    </div>
    <div class="ui-panel-detail">
        <div class="ui-title">
            <h1 id="Diagnosis">诊断
                <asp:LinkButton ID="lbtn_Diagnosis_Edit" runat="server" Text="修改" CssClass="ui-title-lbtn" Visible="true" CommandName="Diagnosis" CommandArgument="Edit" OnClick="btn_Modify_Click"></asp:LinkButton>
                <asp:LinkButton ID="lbtn_Diagnosis_Save" runat="server" Text="保存" CssClass="ui-title-lbtn" Visible="false" OnClick="btn_Submit_Click"></asp:LinkButton>
                <asp:LinkButton ID="lbtn_Diagnosis_Cancel" runat="server" Text="取消" CssClass="ui-title-lbtn" Visible="false" OnClick="btn_Cancel_Click"></asp:LinkButton>
            </h1>
        </div>
        <asp:Panel ID="pnl_Diagnosis_Edit" runat="server">
            <table class="ui-panel-detail-table">
                <tr>
                    <th style="vertical-align: top;">临床诊断：</th>
                    <td>
                        <p id="p_ClinicalDiagnosis" class="ui-checkboxlist-show"></p>
                        <p>
                            <asp:CheckBoxList ID="cbl_ClinicalDiagnosis" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow" CssClass="ui-checkboxlist">
                            </asp:CheckBoxList>
                        </p>
                    </td>
                </tr>
                <tr>
                    <th>功能诊断：</th>
                    <td colspan="5">
                        <asp:TextBox ID="txt_FunctionalDiagnosis" runat="server" CssClass="ui-text" Width="620px"></asp:TextBox>
                    </td>
                </tr>
            </table>
        </asp:Panel>
        <asp:Panel ID="pnl_Diagnosis_View" runat="server">
            <table class="ui-panel-detail-table">
                <tr>
                    <th style="vertical-align: top;">临床诊断：</th>
                    <td>
                        <p class="ui-checkboxlist-show">
                            <asp:Literal ID="lbl_ClinicalDiagnosis" runat="server"></asp:Literal>
                        </p>
                    </td>
                </tr>
                <tr>
                    <th>功能诊断：</th>
                    <td colspan="5">
                        <asp:Literal ID="lbl_FunctionalDiagnosis" runat="server"></asp:Literal>
                    </td>
                </tr>
            </table>
        </asp:Panel>
    </div>

    <div class="ui-panel-detail">
        <div class="ui-title">
            <h1 id="Assessment">基本评估填写
                <asp:LinkButton ID="lbtn_Assessment_Edit" runat="server" Text="修改" Visible="true" CssClass="ui-title-lbtn" CommandName="Assessment" OnClick="btn_Modify_Click"></asp:LinkButton>
                <asp:LinkButton ID="lbtn_Assessment_Save" runat="server" Text="保存" CssClass="ui-title-lbtn" Visible="false" OnClick="btn_Submit_Click"></asp:LinkButton>
                <asp:LinkButton ID="lbtn_Assessment_Cancel" runat="server" Text="取消" CssClass="ui-title-lbtn" Visible="false" OnClick="btn_Cancel_Click"></asp:LinkButton>
            </h1>
        </div>
        <asp:Panel ID="pnl_Assessment_Edit" runat="server">
            <table class="ui-panel-detail-table">
                <tr>
                    <th style="vertical-align: top;">病人摘要：</th>
                    <td style="line-height: 30px;">
                        <p>
                            <asp:TextBox ID="txt_Abstract1" runat="server" CssClass="ui-text" Width="60px"></asp:TextBox>
                            <span>P&nbsp;</span>
                            <asp:TextBox ID="txt_Abstract2" runat="server" CssClass="ui-text" Width="60px"></asp:TextBox>
                            <span>次/分；</span>
                        </p>
                        <p>
                            <asp:TextBox ID="txt_Abstract3" runat="server" CssClass="ui-text" Width="60px"></asp:TextBox>
                            <span>BP</span>
                            <asp:TextBox ID="txt_Abstract4" runat="server" CssClass="ui-text" Width="60px"></asp:TextBox>
                            <span>/&nbsp;</span>
                            <asp:TextBox ID="txt_Abstract5" runat="server" CssClass="ui-text" Width="60px"></asp:TextBox>
                            <span>mmHg；</span>
                        </p>
                        <p>
                            <asp:TextBox ID="txt_Abstract6" runat="server" CssClass="ui-text" Width="60px"></asp:TextBox>
                            <span>BP</span>
                            <asp:TextBox ID="txt_Abstract7" runat="server" CssClass="ui-text" Width="60px"></asp:TextBox>
                            <span>/&nbsp;</span>
                            <asp:TextBox ID="txt_Abstract8" runat="server" CssClass="ui-text" Width="60px"></asp:TextBox>
                            <span>mmHg；</span>
                        </p>
                        <p>
                            <asp:TextBox ID="txt_Abstract9" runat="server" CssClass="ui-text" Width="60px"></asp:TextBox>
                            <span>R&nbsp;</span>
                            <asp:TextBox ID="txt_Abstract10" runat="server" CssClass="ui-text" Width="60px"></asp:TextBox>
                            <span>C&nbsp;；</span>
                        </p>
                        <p>
                            <asp:TextBox ID="txt_Abstract11" runat="server" CssClass="ui-text" Width="60px"></asp:TextBox>
                            <span>T&nbsp;</span>
                            <asp:TextBox ID="txt_Abstract12" runat="server" CssClass="ui-text" Width="60px"></asp:TextBox>
                            <span>C&nbsp;；</span>
                        </p>
                    </td>
                </tr>
                <tr>
                    <th style="vertical-align: top">主&nbsp;&nbsp;&nbsp;&nbsp;诉：</th>
                    <td colspan="5">
                        <asp:TextBox ID="txt_Report" runat="server" TextMode="MultiLine" CssClass="ui-area" Width="600px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <th style="vertical-align: top">体格检查：</th>
                    <td colspan="5">
                        <asp:TextBox ID="txt_PhysicalExamination" runat="server" TextMode="MultiLine" CssClass="ui-area" Width="600px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <th style="vertical-align: top; width: 90px;">影像学检查：</th>
                    <td colspan="5">
                        <asp:TextBox ID="txt_ImagingExamination" runat="server" TextMode="MultiLine" CssClass="ui-area" Width="600px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <th style="vertical-align: top">特殊情况：</th>
                    <td colspan="5">
                        <p id="p_SpecialCircumstances" class="ui-checkboxlist-show"></p>
                        <p>
                            <asp:CheckBoxList ID="cbl_SpecialCircumstances" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow" CssClass="ui-checkboxlist">
                            </asp:CheckBoxList>
                        </p>
                    </td>
                </tr>
            </table>
        </asp:Panel>
        <asp:Panel ID="pnl_Assessment_View" runat="server">
            <table class="ui-panel-detail-table">
                <tr>
                    <th style="vertical-align: top;">病人摘要：</th>
                    <td style="line-height: 30px;">
                        <p>
                            <asp:Literal ID="lbl_Abstract1" runat="server"></asp:Literal>
                            <span>P&nbsp;</span>
                            <asp:Literal ID="lbl_Abstract2" runat="server"></asp:Literal>
                            <span>次/分；</span>
                        </p>
                        <p>
                            <asp:Literal ID="lbl_Abstract3" runat="server"></asp:Literal>
                            <span>BP</span>
                            <asp:Literal ID="lbl_Abstract4" runat="server"></asp:Literal>
                            <span>/&nbsp;</span>
                            <asp:Literal ID="lbl_Abstract5" runat="server"></asp:Literal>
                            <span>mmHg；</span>
                        </p>
                        <p>
                            <asp:Literal ID="lbl_Abstract6" runat="server"></asp:Literal>
                            <span>BP</span>
                            <asp:Literal ID="lbl_Abstract7" runat="server"></asp:Literal>
                            <span>/&nbsp;</span>
                            <asp:Literal ID="lbl_Abstract8" runat="server"></asp:Literal>
                            <span>mmHg；</span>
                        </p>
                        <p>
                            <asp:Literal ID="lbl_Abstract9" runat="server"></asp:Literal>
                            <span>R&nbsp;</span>
                            <asp:Literal ID="lbl_Abstract10" runat="server"></asp:Literal>
                            <span>C&nbsp;；</span>
                        </p>
                        <p>
                            <asp:Literal ID="lbl_Abstract11" runat="server"></asp:Literal>
                            <span>T&nbsp;</span>
                            <asp:Literal ID="lbl_Abstract12" runat="server"></asp:Literal>
                            <span>C&nbsp;；</span>
                        </p>
                    </td>
                </tr>
                <tr>
                    <th style="vertical-align: top">主&nbsp;&nbsp;&nbsp;&nbsp;诉：</th>
                    <td colspan="5">
                        <asp:Literal ID="lbl_Report" runat="server"></asp:Literal>
                    </td>
                </tr>
                <tr>
                    <th style="vertical-align: top">体格检查：</th>
                    <td colspan="5">
                        <asp:Literal ID="lbl_PhysicalExamination" runat="server"></asp:Literal>
                    </td>
                </tr>
                <tr>
                    <th style="vertical-align: top; width: 90px;">影像学检查：</th>
                    <td colspan="5">
                        <asp:Literal ID="lbl_ImagingExamination" runat="server"></asp:Literal>
                    </td>
                </tr>
                <tr>
                    <th style="vertical-align: top">特殊情况：</th>
                    <td colspan="5">
                        <p class="ui-checkboxlist-show">
                            <asp:Literal ID="lbl_SpecialCircumstances" runat="server"></asp:Literal>
                        </p>
                    </td>
                </tr>
            </table>
        </asp:Panel>
    </div>
    <p style="text-align: center">
        <asp:Button ID="btn_Submit" runat="server" CssClass="ui-btn" Text="确认" OnClick="btn_Submit_Click" />
    </p>



</asp:Content>
<asp:Content ID="Content10" ContentPlaceHolderID="Footer" runat="Server">
    <p style="text-align: right">
        <asp:Button ID="btn_Select" runat="server" Text="选择量表" CssClass="ui-btn" OnClick="btn_SelectGaugeType_Click" />
    </p>

    <script type="text/javascript">
        $(function () {
            $('#<%=cbl_ClinicalDiagnosis.ClientID %> input').click(function () {
                ShowClinicalDiagnosisCheckedItems();
            });

            $('#<%=cbl_SpecialCircumstances.ClientID %> input').click(function () {
                ShowSpecialCircumstancesCheckedItems();
            });

            ShowClinicalDiagnosisCheckedItems();
            ShowSpecialCircumstancesCheckedItems();
        });

        function ShowClinicalDiagnosisCheckedItems() {
            var _html = "";
            $('#<%=cbl_ClinicalDiagnosis.ClientID %> input').each(function () {
                if ($(this).attr("checked") == "checked") {
                    _html += "<span>" + $(this).next("label").text() + "</span>";
                }
            });
            $('#p_ClinicalDiagnosis').html(_html);
        }

        function ShowSpecialCircumstancesCheckedItems() {
            var _html = "";
            $('#<%=cbl_SpecialCircumstances.ClientID %> input').each(function () {
                if ($(this).attr("checked") == "checked") {
                    _html += "<span>" + $(this).next("label").text() + "</span>";
                }
            });
            $('#p_SpecialCircumstances').html(_html);
        }
    </script>
</asp:Content>

